DataSource for Entity Framework in WPF
C1.WPF.LiveLinq Namespace / WpfExtensions Class / AsLive Method / AsLive<T>(INotifyCollectionChanged,ViewOrder) Method
The type of the elements in the view.
The System.Collections.Specialized.INotifyCollectionChanged data source to expose as a view.
Specifies whether to preserve source item order.

In This Topic
    AsLive<T>(INotifyCollectionChanged,ViewOrder) Method
    In This Topic
    Creates a view based on the specified System.Collections.Specialized.INotifyCollectionChanged data source.
    Syntax
    'Declaration
     
    Public Overloads Shared Function AsLive(Of T)( _
       ByVal source As INotifyCollectionChanged, _
       ByVal order As ViewOrder _
    ) As View(Of T)
    public static View<T> AsLive<T>( 
       INotifyCollectionChanged source,
       ViewOrder order
    )

    Parameters

    source
    The System.Collections.Specialized.INotifyCollectionChanged data source to expose as a view.
    order
    Specifies whether to preserve source item order.

    Type Parameters

    T
    The type of the elements in the view.

    Return Value

    A view that contains the same elements as the System.Collections.Specialized.INotifyCollectionChanged data source.
    Remarks

    Use this method to build views from existing data sources implementing System.Collections.Specialized.INotifyCollectionChanged. The element type of this data source must implement System.ComponentModel.INotifyPropertyChanged, see Using the built-in collection class IndexedCollection(T) (LiveLinq to Objects)|tag=Using_the_built_in_collection_class_IndexedCollectionT_LiveLinq_to_Objects.

    If the order parameter specifies preserving item order, the order of items in the source is preserved, at a certain performance cost, in the resulting view and in views based on it (for example, if you filter it with Where).

    Note that Join does not preserve source order. If you need to order a join result, use OrderBy after Join.

    See Also